import request from "@/utils/request";

// 添加公司
export function insertBasicCompany(data) {
  return request({
    url: "/basic/insertBasicCompany",
    method: "post",
    data,
  });
}
// 公司列表
export function queryBasicCompany(params) {
  return request({
    url: "/basic/queryBasicCompany",
    method: "get",
    params,
  });
}
// basic/updateBasicCompany
// 修改公司信息
export function updateBasicCompany(data) {
  return request({
    url: "/basic/updateBasicCompany",
    method: "post",
    data,
  });
}
// 添加富文本
export function insertRichTextManagement(data) {
  return request({
    url: "/richTextManagement/insertRichTextManagement",
    method: "post",
    data,
  });
}
// 查询富文本

export function queryWxUserInfo(params) {
  return request({
    url: "/richTextManagement/query",
    method: "get",
    params,
  });
}
// 修改富文本
export function updateRichTextManagement(data) {
  return request({
    url: "/richTextManagement/updateRichTextManagement",
    method: "post",
    data,
  });
}

// 删除富文本
export function deleteRichTextManagement(id) {
  return request({
    url: "/richTextManagement/deleteRichTextManagement/" + id,
    method: "post",
  });
}
// 添加轮播图
export function insertCarouselImageManagement(data) {
  return request({
    url: "/carouselImageManagement/insertCarouselImageManagement",
    method: "post",
    data,
  });
}
// 修改轮播图
export function updateCarouselImageManagement(data) {
  return request({
    url: "/carouselImageManagement/updateCarouselImageManagement",
    method: "post",
    data,
  });
}
// 获取轮播图列表
export function queryCarouselImageManagement(params) {
  return request({
    url: "/carouselImageManagement/queryCarouselImageManagement",
    method: "get",
    params,
  });
}
// 删除轮播图
export function deleteCarouselImageManagement(id) {
  return request({
    url: "/carouselImageManagement/deleteCarouselImageManagement/" + id,
    method: "post",
  });
}
// 用id查询轮播图数据

export function queryCarouselImageManagementById(id) {
  return request({
    url: "/carouselImageManagement/queryCarouselImageManagementById?id=" + id,
    method: "get",
  });
}
// 用id查询富文本

export function queryRichTextManagementById(id) {
  return request({
    url: "/richTextManagement/queryRichTextManagementById?id=" + id,
    method: "get",
  });
}

// 添加问卷
export function questionnaireInsert(data) {
  return request({
    url: "/questionnaire/insert",
    method: "post",
    data,
  });
}
// 查询问卷接口
export function questionnaireQuery(params) {
  return request({
    url: "/questionnaire/query",
    method: "get",
    params,
  });
}
// 用id查询问卷
export function queryDetails(id) {
  return request({
    url: "/questionnaire/queryDetails?id=" + id,
    method: "get",
  });
}
// 编辑问卷
export function questionnaireUpdate(data) {
  return request({
    url: "/questionnaire/update",
    method: "post",
    data,
  });
}

// 删除问卷
export function questionnaireDelete(id) {
  return request({
    url: "/questionnaire/delete/" + id,
    method: "post",
  });
}
// 修改发布状态
export function updatePublished(id) {
  return request({
    url: "/questionnaire/updatePublished/" + id,
    method: "post",
  });
}
// 获取提交记录
export function querySubmissionRecord(params) {
  return request({
    url: "/questionnaire/querySubmissionRecord",
    method: "get",
    params,
  });
}
// 用id查询问卷
export function querySubmissionRecordDetails(id) {
  return request({
    url: "/questionnaire/querySubmissionRecordDetails?id=" + id,
    method: "get",
  });
}
// 用户信息
export function queryWxUserInfoUser(params) {
  return request({
    url: "/wx/user/queryWxUserInfo",
    method: "get",
    params,
  });
}
// 查询关联信息

export function queryCarouselImageLinkType(params) {
  return request({
    url: "/basic/queryCarouselImageLinkType",
    method: "get",
    params,
  });
}
